<link href="__PUBLICURL__/ztree/css/zTreeStyle.css" rel="stylesheet" type="text/css" />
<script src="__PUBLICURL__/ztree/jquery.ztree.js"></script>
<script src="__PUBLICURL__/ztree/jquery.ztree.exhide.js"></script>
<style>
html, body { width: 100%; height: 100%; overflow: hidden; margin: 0; background:none; }
html { _height: auto; _padding: 50px 0 0px; }
</style>
<ul class="nav  nav-navicon admin-menu">
    <div class="nav-head" id="nav-head">内容管理</div>
    <div id="menu" class="load">
    <ul id="tree" class="ztree load" onClick="parent.SetCwinHeight('menu_fram');">
        
    </ul>
    <!--hook-->
        <?php module('common')->plus_hook('menu','content_tpl');  ?>
    <!--hook end-->
    </div>
  </ul>
<script>
var zTree;
var setting = {
    view: {
        showLine: true,
        selectedMulti: false
    },
    data: {
        simpleData: {
            enable: true,
            idKey: "cid",
            pIdKey: "pid",
            rootPId: ""
        }
    },
	callback: {
		onClick: onClick
	}
};
var zNodes = [
 <?php echo $class_tree; ?>
];

function onClick(e,treeId, treeNode) {
	var zTree = $.fn.zTree.getZTreeObj("tree");
	if(treeNode.url==null){
	zTree.expandNode(treeNode);
	}
	
}
$(document).ready(function() {
    var t = $("#tree");
    t = $.fn.zTree.init(t, setting, zNodes);
    ajaxload('__APP__/content_index');
	$('#tree').bind('click',function(){
		 parent.SetCwinHeight('menu_fram');	
	})
});
</script>    
